﻿using System;

namespace KPIS.GERP.GHRMS.MODEL
{
    public class FieldAttribute : Attribute
    {
        public bool IsPrimaryKey { get; set; }
        public string FieldName { get; set; }
        public Type FieldType { get; set; }
        public bool IsRecordStatus { get; set; }
        public bool IsCreateBy { get; set; }
        public bool IsCreateWhen { get; set; }
        public bool IsUpdateBy { get; set; }
        public bool IsUpdateWhen { get; set; }

        public FieldAttribute(string fieldName, Type fieldType, bool isPrimaryKey = false, bool isRecordStatus = false,
            bool isCreateBy = false, bool isCreateWhen = false, bool isUpdateBy = false, bool isUpdateWhen = false)
        {
            FieldName = fieldName;
            IsPrimaryKey = isPrimaryKey;
            FieldType = fieldType;
            IsRecordStatus = isRecordStatus;
            IsCreateBy = isCreateBy;
            IsCreateWhen = isCreateWhen;
            IsUpdateBy = isUpdateBy;
            IsUpdateWhen = isUpdateWhen;
        }
    }
}
